package com.nuctech.hardwaredriver.util;

/**
 * Created by 心魂free on 2019/11/1.
 * <p>
 * 默认串口,GPIO口配置数据
 */

public class DefaultConfigUtil {

    public static String number = "/dev/ttyS1";
    public static int port = 500000;
    public static int stopBits = 1;
    public static int dataBits = 8;
    public static int parity = 0;
    public static int flowCon = 0;
    public static int flags = 0;
    public static int timeOut = 3;

    public static volatile int receiveDataTotalLength;       //串口返回数据的总长度
    public static final int SINGLERESULTDATA = 6;            //单数据返回时正确数据头
    public static final int MULTITUDINOUSRESULTHEADDATA = 2;     //多数据返回时正确数据头
    public static final int MULTITUDINOUSRESULTFOOTDATA = 3;

    public static final int GPIO_LASER_NUMBER = 9;          //激光器GPIO号
    public static final int GPIO_BUZZER_NUMBER = 224;       //蜂鸣器GPIO号
    public static final int GPIO_TEC_NUMBER = 172;          //TEC的GPIO号
    public static final int GPIO_CHINE_NUMBER = 238;        //单片机GPIO号

    public static final int GPIO_DIRECTION_OUT = 1;         //GPIO输出模式
    public static final int GPIO_DIRECTION_IN = 0;          //GPIO输入模式
    public static final int GPIO_STATUS_HIGHT = 1;          //GPIO高电平
    public static final int GPIO_STATUS_LOW = 0;            //GPIO低电平
}
